.class public Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;
.super Lcom/burstly/jackson/map/ser/std/StaticListSerializerBase;
.source "StringCollectionSerializer.java"

# interfaces
.implements Lcom/burstly/jackson/map/ResolvableSerializer;


# annotations
.annotation runtime Lcom/burstly/jackson/map/annotate/JacksonStdImpl;
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/burstly/jackson/map/ser/std/StaticListSerializerBase",
        "<",
        "Ljava/util/Collection",
        "<",
        "Ljava/lang/String;",
        ">;>;",
        "Lcom/burstly/jackson/map/ResolvableSerializer;"
    }
.end annotation


# instance fields
.field protected _serializer:Lcom/burstly/jackson/map/JsonSerializer;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/burstly/jackson/map/JsonSerializer",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lcom/burstly/jackson/map/BeanProperty;)V
    .locals 1
    .parameter "property"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 33
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;-><init>(Lcom/burstly/jackson/map/BeanProperty;Lcom/burstly/jackson/map/JsonSerializer;)V

    .line 34
    return-void
.end method

.method public constructor <init>(Lcom/burstly/jackson/map/BeanProperty;Lcom/burstly/jackson/map/JsonSerializer;)V
    .locals 1
    .parameter "property"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/burstly/jackson/map/BeanProperty;",
            "Lcom/burstly/jackson/map/JsonSerializer",
            "<*>;)V"
        }
    .end annotation

    .prologue
    .line 38
    .local p2, ser:Lcom/burstly/jackson/map/JsonSerializer;,"Lcom/burstly/jackson/map/JsonSerializer<*>;"
    const-class v0, Ljava/util/Collection;

    invoke-direct {p0, v0, p1}, Lcom/burstly/jackson/map/ser/std/StaticListSerializerBase;-><init>(Ljava/lang/Class;Lcom/burstly/jackson/map/BeanProperty;)V

    .line 39
    iput-object p2, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    .line 40
    return-void
.end method

.method private final serializeContents(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V
    .locals 5
    .parameter
    .parameter "jgen"
    .parameter "provider"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection",
            "<",
            "Ljava/lang/String;",
            ">;",
            "Lcom/burstly/jackson/JsonGenerator;",
            "Lcom/burstly/jackson/map/SerializerProvider;",
            ")V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/burstly/jackson/JsonGenerationException;
        }
    .end annotation

    .prologue
    .line 88
    .local p1, value:Ljava/util/Collection;,"Ljava/util/Collection<Ljava/lang/String;>;"
    iget-object v3, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    if-eqz v3, :cond_1

    .line 89
    invoke-direct {p0, p1, p2, p3}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serializeUsingCustom(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V

    .line 105
    :cond_0
    return-void

    .line 92
    :cond_1
    const/4 v1, 0x0

    .line 93
    .local v1, i:I
    invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_0

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 95
    .local v2, str:Ljava/lang/String;
    if-nez v2, :cond_2

    .line 96
    :try_start_0
    invoke-virtual {p3, p2}, Lcom/burstly/jackson/map/SerializerProvider;->defaultSerializeNull(Lcom/burstly/jackson/JsonGenerator;)V

    .line 100
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 98
    :cond_2
    invoke-virtual {p2, v2}, Lcom/burstly/jackson/JsonGenerator;->writeString(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 101
    :catch_0
    move-exception v0

    .line 102
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {p0, p3, v0, p1, v1}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->wrapAndThrow(Lcom/burstly/jackson/map/SerializerProvider;Ljava/lang/Throwable;Ljava/lang/Object;I)V

    goto :goto_0
.end method

.method private serializeUsingCustom(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V
    .locals 6
    .parameter
    .parameter "jgen"
    .parameter "provider"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection",
            "<",
            "Ljava/lang/String;",
            ">;",
            "Lcom/burstly/jackson/JsonGenerator;",
            "Lcom/burstly/jackson/map/SerializerProvider;",
            ")V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/burstly/jackson/JsonGenerationException;
        }
    .end annotation

    .prologue
    .line 110
    .local p1, value:Ljava/util/Collection;,"Ljava/util/Collection<Ljava/lang/String;>;"
    iget-object v2, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    .line 111
    .local v2, ser:Lcom/burstly/jackson/map/JsonSerializer;,"Lcom/burstly/jackson/map/JsonSerializer<Ljava/lang/String;>;"
    const/4 v1, 0x0

    .line 112
    .local v1, i:I
    invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :goto_0
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-nez v5, :cond_0

    .line 123
    return-void

    .line 112
    :cond_0
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 114
    .local v3, str:Ljava/lang/String;
    if-nez v3, :cond_1

    .line 115
    :try_start_0
    invoke-virtual {p3, p2}, Lcom/burstly/jackson/map/SerializerProvider;->defaultSerializeNull(Lcom/burstly/jackson/JsonGenerator;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 119
    :catch_0
    move-exception v0

    .line 120
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {p0, p3, v0, p1, v1}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->wrapAndThrow(Lcom/burstly/jackson/map/SerializerProvider;Ljava/lang/Throwable;Ljava/lang/Object;I)V

    goto :goto_0

    .line 117
    .end local v0           #e:Ljava/lang/Exception;
    :cond_1
    :try_start_1
    invoke-virtual {v2, v3, p2, p3}, Lcom/burstly/jackson/map/JsonSerializer;->serialize(Ljava/lang/Object;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method


# virtual methods
.method protected contentSchema()Lcom/burstly/jackson/JsonNode;
    .locals 2

    .prologue
    .line 43
    const-string v0, "string"

    const/4 v1, 0x1

    invoke-virtual {p0, v0, v1}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->createSchemaNode(Ljava/lang/String;Z)Lcom/burstly/jackson/node/ObjectNode;

    move-result-object v0

    return-object v0
.end method

.method public resolve(Lcom/burstly/jackson/map/SerializerProvider;)V
    .locals 3
    .parameter "provider"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/burstly/jackson/map/JsonMappingException;
        }
    .end annotation

    .prologue
    .line 50
    iget-object v1, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    if-nez v1, :cond_0

    .line 51
    const-class v1, Ljava/lang/String;

    iget-object v2, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_property:Lcom/burstly/jackson/map/BeanProperty;

    invoke-virtual {p1, v1, v2}, Lcom/burstly/jackson/map/SerializerProvider;->findValueSerializer(Ljava/lang/Class;Lcom/burstly/jackson/map/BeanProperty;)Lcom/burstly/jackson/map/JsonSerializer;

    move-result-object v0

    .line 52
    .local v0, ser:Lcom/burstly/jackson/map/JsonSerializer;,"Lcom/burstly/jackson/map/JsonSerializer<*>;"
    invoke-virtual {p0, v0}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->isDefaultSerializer(Lcom/burstly/jackson/map/JsonSerializer;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 53
    iput-object v0, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    .line 56
    .end local v0           #ser:Lcom/burstly/jackson/map/JsonSerializer;,"Lcom/burstly/jackson/map/JsonSerializer<*>;"
    :cond_0
    return-void
.end method

.method public bridge synthetic serialize(Ljava/lang/Object;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/burstly/jackson/JsonGenerationException;
        }
    .end annotation

    .prologue
    .line 1
    check-cast p1, Ljava/util/Collection;

    invoke-virtual {p0, p1, p2, p3}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serialize(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V

    return-void
.end method

.method public serialize(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V
    .locals 1
    .parameter
    .parameter "jgen"
    .parameter "provider"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection",
            "<",
            "Ljava/lang/String;",
            ">;",
            "Lcom/burstly/jackson/JsonGenerator;",
            "Lcom/burstly/jackson/map/SerializerProvider;",
            ")V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/burstly/jackson/JsonGenerationException;
        }
    .end annotation

    .prologue
    .line 62
    .local p1, value:Ljava/util/Collection;,"Ljava/util/Collection<Ljava/lang/String;>;"
    invoke-virtual {p2}, Lcom/burstly/jackson/JsonGenerator;->writeStartArray()V

    .line 63
    iget-object v0, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    if-nez v0, :cond_0

    .line 64
    invoke-direct {p0, p1, p2, p3}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serializeContents(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V

    .line 68
    :goto_0
    invoke-virtual {p2}, Lcom/burstly/jackson/JsonGenerator;->writeEndArray()V

    .line 69
    return-void

    .line 66
    :cond_0
    invoke-direct {p0, p1, p2, p3}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serializeUsingCustom(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V

    goto :goto_0
.end method

.method public bridge synthetic serializeWithType(Ljava/lang/Object;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;Lcom/burstly/jackson/map/TypeSerializer;)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/burstly/jackson/JsonProcessingException;
        }
    .end annotation

    .prologue
    .line 1
    check-cast p1, Ljava/util/Collection;

    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serializeWithType(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;Lcom/burstly/jackson/map/TypeSerializer;)V

    return-void
.end method

.method public serializeWithType(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;Lcom/burstly/jackson/map/TypeSerializer;)V
    .locals 1
    .parameter
    .parameter "jgen"
    .parameter "provider"
    .parameter "typeSer"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection",
            "<",
            "Ljava/lang/String;",
            ">;",
            "Lcom/burstly/jackson/JsonGenerator;",
            "Lcom/burstly/jackson/map/SerializerProvider;",
            "Lcom/burstly/jackson/map/TypeSerializer;",
            ")V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/burstly/jackson/JsonGenerationException;
        }
    .end annotation

    .prologue
    .line 76
    .local p1, value:Ljava/util/Collection;,"Ljava/util/Collection<Ljava/lang/String;>;"
    invoke-virtual {p4, p1, p2}, Lcom/burstly/jackson/map/TypeSerializer;->writeTypePrefixForArray(Ljava/lang/Object;Lcom/burstly/jackson/JsonGenerator;)V

    .line 77
    iget-object v0, p0, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->_serializer:Lcom/burstly/jackson/map/JsonSerializer;

    if-nez v0, :cond_0

    .line 78
    invoke-direct {p0, p1, p2, p3}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serializeContents(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V

    .line 82
    :goto_0
    invoke-virtual {p4, p1, p2}, Lcom/burstly/jackson/map/TypeSerializer;->writeTypeSuffixForArray(Ljava/lang/Object;Lcom/burstly/jackson/JsonGenerator;)V

    .line 83
    return-void

    .line 80
    :cond_0
    invoke-direct {p0, p1, p2, p3}, Lcom/burstly/jackson/map/ser/std/StringCollectionSerializer;->serializeUsingCustom(Ljava/util/Collection;Lcom/burstly/jackson/JsonGenerator;Lcom/burstly/jackson/map/SerializerProvider;)V

    goto :goto_0
.end method
